package dnl.jexem.watchdog.restarts;

import java.util.Date;

import dnl.persistence.orm.GenericJpaDaoImpl;

public class RestartInfoDao extends  GenericJpaDaoImpl<RestartInfo, Integer> {

	public RestartInfoDao() {
		super(RestartInfo.class);
	}

	public void persistRestartInfo(String processName, String originLifeSign){
		RestartInfo restartInfo = new RestartInfo();
		restartInfo.setProcessName(processName);
		restartInfo.setOriginLifeSign(originLifeSign);
		restartInfo.setTime(new Date());
		create(restartInfo);
		create(restartInfo);
	}
	
}
